<!-- addEditContent.html 2017-04-23 16:20:44-->
#@HplusLayout()
#define content()
<div style="padding:10px;height: 100%">
	<form method="post" class="form-horizontal required-validate" action="saveContent" novalidate="novalidate" onsubmit="return validateCallback(this,listDialogAjaxDone)">
		<input type="hidden" name="articleContent.id" value="#(articleContent.id)"/>
		<input type="hidden" name="articleContent.catalog_id" value="#(articleContent.catalog_id)"/>
		<div class="form-group">
			<label class="col-xs-2 control-label">标题：</label>
			<div class="col-xs-9">
				<input type="text" class="form-control required" name="articleContent.title" value="#(articleContent.title)"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">关键词：</label>
			<div class="col-xs-9">
				<input type="text" class="form-control " name="articleContent.keyword" value="#(articleContent.keyword)"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">描述：</label>
			<div class="col-xs-9">
				<textarea name="articleContent.description" class="form-control">#(articleContent.description)</textarea>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">封面图片：</label>
			<div class="col-xs-9">
	    	<div class="input-group">
    		<input type="text" class="form-control" name="articleContent.image" id="articleContent_image" value="#(articleContent.image)"/>
   			<span class="input-group-btn">
   				<button class="btn btn-primary" type="button" onclick="layer.open({content:'#(res_path)#(PRE_PATH)/common/files/upload?directory=article&input=articleContent_image',area: ['600px', '200px'],type: 2,title: '上传文件'})">上传</button>
   			</span>
   	</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">内容：</label>
			<div class="col-xs-9">
				<textarea name="articleContent.content" class="xheditor {skin:'nostyle',forcePtag:false,width:'100%',height:'400px',html5Upload:true,upLinkUrl:'#(res_path)#(PRE_PATH)/common/files/doUpload?directory=article&ui=xheditor',upLinkExt:'zip,rar,txt,doc,docx,xls,xlsx,ppt,pptx',upImgUrl:'#(res_path)#(PRE_PATH)/common/files/doUpload?directory=article&ui=xheditor',upImgExt:'jpg,jpeg,gif,png',upFlashUrl:'#(res_path)#(PRE_PATH)/common/files/doUpload?directory=article&ui=xheditor',upFlashExt:'swf',upMediaUrl:'#(res_path)#(PRE_PATH)/common/files/doUpload?directory=article&ui=xheditor',upMediaExt:'avi,wav'}">#(articleContent.content)</textarea>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">自定义链接：</label>
			<div class="col-xs-2">
	
				<input type="text" class="form-control " name="articleContent.custom" value="#(articleContent.custom)"/>
			</div>
			<label class="col-xs-2 control-label">跳转链接：</label>
			<div class="col-xs-2">
	
				<input type="text" class="form-control " name="articleContent.redirect" value="#(articleContent.redirect)"/>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-2 control-label">排序编号：</label>
			<div class="col-xs-2">
				<input type="text" class="form-control required" name="articleContent.sort" value="#(articleContent.sort??"100")"/>
			</div>
			<label class="col-xs-2 control-label">允许评论：</label>
			<div class="col-xs-2">
			#for(item:data("SHIFOU"))
				<label style="font-weight:normal;line-height: 35px"><input class="required" type="radio" name="articleContent.is_comment" #if(articleContent.is_comment)#if(articleContent.is_comment==item.key)checked="checked"#end#elseif(item.key=="T")checked="checked"#end value="#(item.key)"/> #(item.value.name) </label>
			#end
			</div>
			<label class="col-xs-2 control-label">状态：</label>
			<div class="col-xs-2">
			#for(item:data("ENABLE_FLAG"))
				<label style="font-weight:normal;line-height: 35px"><input class="required" type="radio" name="articleContent.enable_flag" #if(articleContent.enable_flag)#if(articleContent.enable_flag==item.key)checked="checked"#end#elseif(item.key=="T")checked="checked"#end value="#(item.key)"/> #(item.value.name) </label>
			#end
			</div>
		</div>
		<div class="form-group">
			<div class="col-xs-8 col-xs-offset-3">
				<button type="submit" class="btn btn-primary">保存</button>
			</div>
		</div>
	</form>
</div>
#end
#define js()
<script src="#(path)/hplus/js/plugins/validate/jquery.validate.min.js"></script>
<script src="#(path)/hplus/js/plugins/validate/messages_zh.min.js"></script>
<script src="#(path)/hplus/js/plugins/laydate/laydate.js"></script>
<script src="#(path)/hplus/js/plugins/xheditor/xheditor-1.2.2.min.js"></script>
<script src="#(path)/hplus/js/plugins/xheditor/zh-cn.js"></script>
#end
